package com.efast.dmom.aps.bean;

import java.util.List;

import com.efast.dmom.aps.bean.base.BaseBean;
import com.efast.dmom.aps.entity.RouteEntity;

/**
 * @author Aaron Liu
 *
 * @date:2020年1月7日
 */
public class Route extends BaseBean<RouteEntity> {

	private static final long serialVersionUID = -5392485154299137011L;

	private List<RouteQueue> routeQueues = null;
	private List<RouteStep> routeSteps = null;
	private List<Arc> routeArcs = null;
	private List<ProductionLine> productionLines = null;

	private RouteEntity innerData;

	public RouteEntity getInnerData() {
		return innerData;
	}

	public void setInnerData(RouteEntity innerData) {
		this.innerData = innerData;
	}

	public List<RouteQueue> getRouteQueues() {
		return routeQueues;
	}
	
	public void removeRouteStep(List<RouteStep> stepList){
		
		if(stepList != null){
			routeSteps.removeAll(stepList);
		}
	}
	
	public void removeRouteArc(List<Arc> arcList){
		
		if(arcList != null){
			routeArcs.removeAll(arcList);
		}
	}
	
	public void removeRouteQueue(List<RouteQueue> queueList){
		
		if(queueList != null){
			routeQueues.removeAll(queueList);
		}
	}

	public void setRouteQueues(List<RouteQueue> routeQueues) {
		this.routeQueues = routeQueues;
	}

	public List<RouteStep> getRouteSteps() {
		return routeSteps;
	}

	public void setRouteSteps(List<RouteStep> routeSteps) {
		this.routeSteps = routeSteps;
	}

	public List<Arc> getRouteArcs() {
		return routeArcs;
	}

	public void setRouteArcs(List<Arc> routeArcs) {
		this.routeArcs = routeArcs;
	}

	public List<ProductionLine> getProductionLines() {
		return productionLines;
	}

	public void setProductionLines(List<ProductionLine> productionLines) {
		this.productionLines = productionLines;
	}

	public boolean equals(Object obj) {

		boolean result = false;

		if (obj instanceof Route) {

			if (this.getInnerData().getId() <= 0) {
				result = (this == (Route) obj);
			} else {
				result = (this.getInnerData().getId() == ((Route) obj).getInnerData().getId());
			}
		}
		return result;
	}

}
